www.gusucode.com > VC 模拟银行系统ATM自动取款机-源码程序 > VC 模拟银行系统ATM自动取款机-源码程序/code/ATM/DepositDlg.cpp
//Download by http://www.NewXing.com // DepositDlg.cpp : implementation file // #include "stdafx.h" #include "ATM.h" #include "DepositDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDepositDlg dialog CDepositDlg::CDepositDlg(CWnd* pParent /*=NULL*/) : CDialog(CDepositDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDepositDlg) m_nMoney = 0; //}}AFX_DATA_INIT } void CDepositDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDepositDlg) DDX_Text(pDX, IDC_EDIT1, m_nMoney); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDepositDlg, CDialog) //{{AFX_MSG_MAP(CDepositDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDepositDlg message handlers void CDepositDlg::OnOK() { // TODO: Add extra validation here UpdateData(TRUE); if(m_nMoney%50 != 0) { AfxMessageBox("您输入的金额数不是50的整数倍,请重新输入!"); m_nMoney = 0; UpdateData(FALSE); return; } CDialog::OnOK(); }